

import 'package:erp/UI/CodeResources/Localization.dart';
import 'package:flutter/material.dart';

Future<bool> showQuestionDialog(BuildContext context, {String title, String content, bool barrierDismmissible = true, String confirmButtonText = "ھەئە", String cancelButtonText = "ياق"}){
  var currentLocale = AppLocalizations.of(context);

  return showDialog(context: context, barrierDismissible: barrierDismmissible, builder: (context) {
    return Directionality(
      textDirection: currentLocale.textDirection,
      child: AlertDialog(
        title: Text(title),
        content: Text(content),
        actions: <Widget>[
          FlatButton(onPressed: (){
            Navigator.of(context).pop(true);
          }, child: Text(confirmButtonText)),
          FlatButton(onPressed: (){
            Navigator.of(context).pop(false);
          }, child: Text(cancelButtonText))
        ],
      ),
    );
  });
}